Skip to content

Fix volunteer spreadsheet tests for term and senior results#1769

Merged
MImran2002 merged 1 commit into
developmentfrom
TestCASE
Jul 20, 2026
Merged

Fix volunteer spreadsheet tests for term and senior results#1769
MImran2002 merged 1 commit into
developmentfrom
TestCASE

Conversation

@BhushanSah

Copy link
Copy Markdown
Contributor

Issue Description

The spreadsheet CI tests were failing because the expected test output no longer matched the current spreadsheet behavior.

getUniqueVolunteers() now returns a Term column, but the test still expected only Full Name, Email, and B-Number.

graduatingSeniorsVolunteerHours() can also return existing senior records from the database, so the test should not expect the entire result list to be empty or only contain the test-created users.

Changes

  • Updated test_getUniqueVolunteers to include the Term column in the expected output.
  • Added expected term values to each unique volunteer row.
  • Updated test_graduatingSeniorsVolunteerHours to check for specific test users instead of assuming the full result list is empty.
  • Adjusted Bob Builder’s expected semester count and total hours after adding another unique service semester.
  • Added checks to make sure non-senior students are still excluded.
  • Added checks to make sure non-service events do not increase the service semester count.

Testing

  • Ran:
pytest tests/code/test_spreadsheet.py -q

@BhushanSah
BhushanSah requested a review from MImran2002 July 17, 2026 16:42
@github-actions

Copy link
Copy Markdown

View Code Coverage

@BhushanSah BhushanSah self-assigned this Jul 18, 2026

@brightfietsop-ux brightfietsop-ux left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, I approve.

@MImran2002 MImran2002 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved this fixed next time please look into the logic and see why the test is broken. so that we can know if its working or not.

@MImran2002
MImran2002 merged commit f400fc6 into development Jul 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants